package com.maiworld.api.controller;

import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.maiworld.seller.service.ConsumeService;

@RestController
@RequestMapping("/con")
public class ConsumeController {

	@Reference
	private ConsumeService  consumeService;
	
	//添加或加少金币(测试通过)
	@RequestMapping("/update")
	public Map<String,  Object> updateStudent(Long sid,String flag,String coinsNum,String session_key){
		
		//System.out.print(sid);
		//System.out.print(flag);
		//System.out.print(coinsNum);
		return consumeService.updateStudent(sid, flag, coinsNum);
		
	}
	//获得--消耗/ 详情（consume表）(测试通过)
	@RequestMapping("/findOne")
	public Map<String,  Object> findOne(String status, String typelog){
		return consumeService.findOne(status,typelog);
	}
	

}
